from django.urls import path,re_path
from users.views import UsersTestViews,MobileApiView,RegisterViews
from rest_framework_simplejwt.views import TokenRefreshView,TokenObtainPairView,TokenVerifyView
from users.views_sms import SMSApaViews
urlpatterns = [
    # 测试视图 创建用户
    path('register_testadd/',UsersTestViews.as_view()),


    path('jwt/access/',TokenObtainPairView.as_view()),
    path('jwt/refresh/',TokenRefreshView.as_view()),
    path('jwt/verify/',TokenVerifyView.as_view()),
    # 注册
    path('register/',RegisterViews.as_view()),
    # 注册发送短信验证码视图
    re_path('sendsms/(?P<mobile>1[3-9]\d{9})/$',SMSApaViews.as_view()),

    re_path(r'^mobile/(?P<mobile>1[3-9]\d{9})/$',MobileApiView.as_view()),

]
